-
Notifications
You must be signed in to change notification settings - Fork 0
Merge Working Branch #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Separation - Split the beveling workflow into clear, modular methods for better readability. - Added `modifyWorkflow()` to encapsulate the entire beveling process sequence. - Improved edge point creation with dedicated logic in `generateEdgePointsForFaces`. - Introduced `clear()` to reset all related data structures before processing. - Updated traversal logic to ensure edge processing is more structured and efficient. - Removed redundant utility methods in favor of streamlined logic with clearer names. - Enhanced error handling with checks (e.g., null checks for meshes). - Improved the use of helper methods (`toReverseArray`) for geometry transformations.
Introduced default values for size and height to simplify
initialization.
Replaced deprecated mesh operations with TranslateModifier and
RotateModifier for cone transformations.
Modularized rendering logic by introducing renderMesh to reduce
redundancy and improve readability.
Centralized cone creation logic in createCone for better code reuse
and consistency.
Enhanced method and variable naming for clarity.
- Updated class name from `ViewGizmo` to `ViewportCompass` to better reflect its purpose as a non-interactive orientation indicator for the viewport. - Adjusted references and comments to align with the new name.
- Switched to `Vector3f` for cleaner rotation handling. - Centralized rotation updates using `setRotation(Vector3f)` with clamping logic to ensure safe ranges (-π, π). - Removed individual axis setter methods for simplicity and better maintainability.
- Documented the purpose of the `ViewportCompass` class. - Added JavaDoc for all methods to explain their purpose, parameters, and logic. - Improved maintainability and developer clarity by providing context for each helper method and transformations.
- Restructured package hierarchy to better organize framework components. - Decoupled core UI logic from Processing-specific implementations, paving the way for broader flexibility and rendering backends. - Began transforming library from a prototype to a robust, extensible UI framework. - Introduced abstract base classes and interfaces for key components. - Updated existing components to align with the new architecture. - Enhanced modularity by improving separation of concerns: - Moved rendering logic to dedicated `Renderer` classes. - Improved code clarity and maintainability with better encapsulation and naming conventions. - Added comprehensive JavaDocs to foundational classes for improved readability and usability. This commit marks the foundational shift from a prototype to a polished framework capable of supporting future scalability and flexibility. Follow-up commits will address integration, performance tuning, and additional feature development.
- Introduced `Light` interface to define common properties and behavior for all light types. - Added `LightRenderer` interface to decouple rendering logic for different light types. - Implemented `DirectionalLight` for uniform parallel lighting, typically used for simulating sunlight. - Implemented `PointLight` for omnidirectional light sources. - Implemented `Spotlight` for directional lighting with limited cone angles. - Added `LightType` enum to categorize and identify light types. This commit establishes a flexible and extensible lighting system, enabling dynamic light management and rendering in the scene graph.
| g.textAscent() + g.textDescent() + padding + padding); | ||
| g.setColor(foreground); | ||
| g.text(text, padding, y + g.getTextSize() + padding); | ||
| y += g.getTextSize() + gap + padding + padding; |
Check failure
Code scanning / CodeQL
Implicit narrowing conversion in compound assignment High
int
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 12 months ago
To fix the problem, we need to ensure that the type of the left-hand side of the compound assignment statement is at least as wide as the type of the right-hand side. In this case, we should change the type of y from int to float to match the type of the expression g.getTextSize() + gap + padding + padding.
- Change the declaration of
yfrominttofloaton line 27. - This change ensures that the addition operation and the assignment do not involve any implicit narrowing conversion, thus preserving the precision of the
floatvalues.
-
Copy modified line R27
| @@ -26,3 +26,3 @@ | ||
| public void renderSelf(Graphics g) { | ||
| int y = 300; | ||
| float y = 300; | ||
| int padding = 5; |
No description provided.